package com.edu.entity.chat;

import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class Essay {
    private int id;
    private int userid;
    private int chatid;
    private String essayname;
    private int satisfied;
    private String essaycontent;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createtime;

    public Essay() {
    }

    public Essay(int id, int userid, int chatid, String essayname, int satisfied, String essaycontent, Date createtime) {
        this.id = id;
        this.userid = userid;
        this.chatid = chatid;
        this.essayname = essayname;
        this.satisfied = satisfied;
        this.essaycontent = essaycontent;
        this.createtime = createtime;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getUserid() {
        return userid;
    }

    public void setUserid(int userid) {
        this.userid = userid;
    }

    public int getChatid() {
        return chatid;
    }

    public void setChatid(int chatid) {
        this.chatid = chatid;
    }

    public String getEssayname() {
        return essayname;
    }

    public void setEssayname(String essayname) {
        this.essayname = essayname;
    }

    public int getSatisfied() {
        return satisfied;
    }

    public void setSatisfied(int satisfied) {
        this.satisfied = satisfied;
    }

    public String getEssaycontent() {
        return essaycontent;
    }

    public void setEssaycontent(String essaycontent) {
        this.essaycontent = essaycontent;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    @Override
    public String toString() {
        return "Essay{" +
                "id=" + id +
                ", userid=" + userid +
                ", chatid=" + chatid +
                ", essayname='" + essayname + '\'' +
                ", satisfied=" + satisfied +
                ", essaycontent='" + essaycontent + '\'' +
                ", createtime=" + createtime +
                '}';
    }
}
